RexxBGUI is used to create the FWCAddEvent requester. Because the requestor is generated "on the fly" and then compiled, it is normal to expect a short (too long?) delay between placing a call to FWCAddEvent and the requestor showing up.
Note that both FWCalendar and FWCAddEvent use the same preferences file for initializing variables; caution should be exercised when changing the file between using FWCalendar and FWCAddEvent or the results may be unpredictable. See notes on the variable editor for more details.
USE
Create a calendar with FWCalendar or load a previously created calendar;
FWCAddEvent will not work unless a generated calendar is present! To run
FWCAddEvent for Final Writer, select the "FWCAddEvent" item from the "User" menu
(if you didn't follow the installation procedures included with this guide,
select the "User/Other/ARexx Script ..." menu item and find the FWCAddEvent
macro). For PageStream, select the FWCAddEvent macro entry from the "Scripts"
palette (if you followed the installation procedures included with this guide),
otherwise select the "Scripts/Play External Script ..." menu item and find the
FWCAddEvent macro.
The FWCAddEvent requestor is created "on the fly," with a different requestor
created for each month.
The top-left gadget cycles between "Event" and "File" choices. When the "Event" choice is selected, you can enter the desired event in the text box. When the "File" choice is selected, a requester will pop up allowing you to select a pre-defined event data file (see Prefs & Data for the format of this file); the name of the chosen file will be displayed in the text box. In the case where a file is chosen, most of the remaining gadgets will be ghosted as the values are either read from the data file or set to the defaults.
Under the file/event box is a set of gadgets allowing the font
and font size for the added event to be changed. As with the variable editor, the
file button must be used to change the font; changing the font by directly editing the
contents of the font box will have no effect. The small box shows the font size
currently in use (always a whole number for Final Writer); this can be changed
as desired. The "Reset" button will reset the font to
Font.Highlight
(as determined by either the preferences file or the
internal defaults) and font size to the value determined by the macro. See the
section on Prefs & Data for further
information regarding the formatting of added events.
Note that, although any font size can be entered, the positioning
of the added line will be determined according to the AddEventRows
variable and internal calculations. Looking at the image above, for example, the
default font size is about 9.53 pts. If an event with a font size of 19 pts is entered
on line 3, that event will cover both lines 3 and 4; attempts to add other
events on line 4 would result in the text of the events overlapping.
The majority of the requestor consists of a bunch of buttons representing the days of the month (including days of the previous and next months as appropriate). The dates clicked will alternate between being entered as the Start and End dates, shown to the right of the calendar buttons (the first date clicked will be entered as the Start date, the next as the End date, the next as the Start date, the next as the End date, and so on). The End date does not need to be designated for single-day events. If the Start date is after the End date, the dates will be switched in the macro.
The "Line" cycle gadget determines on which line of the calendar the event will be inserted, ranging from 0 to the maximum number of lines that will fit in a calendar cell (defaults to line 1). Note that these are the lines that will fit on a full-sized day; half-size days (those days at the end of the month that are split) will not be able to hold the full complement of lines. Certain lines may also be filled by Highlights added during generation of the calendar; events added to these lines would overwrite the highlight text.
The "Box" checkbox tells whether events should be outlined in a box or not. All multi-day events WILL BE boxed. Boxed entries will have text lines centered; unboxed multi-line events will have the second and subsequent lines indented.
You can select a color for the event text by selecting a color in the "Text"
cycle gadget. You can assign a color to the Box background by selecting a color
in the "Box" cycle gadget. The defaults for these colors are determined by
Color.AddEvent
and Background.AddEvent
, respectively, as set in the
loaded preferences file.
You can select the frequence for the event text by selecting a value in the "Frequency" cycle gadget. Events can be added once, weekly, or biweekly. Weekly and biweekly events will be repeated from the starting point to the end of the calendar. All events can be single-day (Staff Mtg every Wednesday) or multi-day (Thursday/Friday seminar every week this month), and can wrap around the weekend.
Enter the desired information (minimum: event text/data file and start date), then click the OK gadget. The text will be drawn on the screen one or more times as it is sized to fit in the span of days you selected. After it is sized properly, it will be placed in the proper location (can you help me speed this part up?). Click the Cancel gadget to cancel the requestor (the requestor will keep reappearing automatically until the requestor is cancelled or closed).
This macro is designed to work specifically with FWCalendar. To determine the calendar layout, the FWCAddEvent macro reads specific information used to create the calendar from the calendar itself and from the preferences file used to create the calendar. Variables changed using the variable editor will not be recognized. The same preferences file as was used in creation of the calendar will be used in adding events.
Texts added via FWCAddEvent are simply text objects. If one of these text objects is no longer desired (perhaps it ended up in the wrong place), it must be deleted through Final Writer or PageStream. There is no provision from FWCAddEvent to delete previously added event text.